var num2 = 0;
var arrayGLog = new Array();
var arraySLog = new Array();
var arrayRLog = new Array();
function divLOGS()
{
    var divLogs = document.createElement("div");
    divLogs.setAttribute("id", "divLogs");
    document.getElementById("divBuild").appendChild(divLogs);
    BtAgregaLogs();
}

function BtAgregaLogs()
{

    var BtAgregaLogs = document.createElement("input");
    BtAgregaLogs.setAttribute("type", "button");
    BtAgregaLogs.setAttribute("value", "Agregar LOGS");
    BtAgregaLogs.setAttribute("id", "BtAgregaLogs");
    BtAgregaLogs.setAttribute("class", "boton");
    BtAgregaLogs.setAttribute("onclick", "hdte(event)");
    document.getElementById("divLogs").appendChild(BtAgregaLogs);
}
var aux;
function crearObjetosLOGS() {
    if (num2 < 3)
    {
        num2++;
        arrayGLog.push("groupLOG" + num2);
        arraySLog.push("sizeLOGS" + num2);
        arrayRLog.push("rutaLOG" + num2);
        
        var divLOGS = doc.createElement("div");
        divLOGS.setAttribute("id", "divLOGS" + num2);
        divLOGS.setAttribute("class", "divLOGS");
        
        var labelLOGS = doc.createElement("label");
        labelLOGS.id = 'labelLOGS' + num2;
        labelLOGS.setAttribute("class", "label");
        labelLOGS.innerHTML = "LOG" + num2;
        
        var groupLOG = doc.createElement("input");
        groupLOG.setAttribute("id", "groupLOG" + num2);
        groupLOG.setAttribute("class", "textLogs text_LOG_group");
        groupLOG.setAttribute("value", num2);
        groupLOG.setAttribute("size", "3");
        groupLOG.setAttribute("type", "text");
        
        var labelg = doc.createElement("label");
        labelg.id = 'labelg' + num2;
        labelg.setAttribute("class", "label");
        labelg.innerHTML = "Group";
        
        var labelsi = doc.createElement("label");
        labelsi.id = 'labelsi' + num2;
        labelsi.setAttribute("class", "label");
        labelsi.innerHTML = "Size";
             
        var sizeLOGS = doc.createElement("input");
        sizeLOGS.setAttribute("id", "sizeLOGS" + num2);
        sizeLOGS.setAttribute("class", "textLogs  text_LOG_size");
        sizeLOGS.setAttribute("size", "3");
        sizeLOGS.setAttribute("value", "100");
        sizeLOGS.setAttribute("type", "text");
        //PATHS
       
        var labelPathLog1 = document.createElement("label");
        labelPathLog1.setAttribute("id", "labelPathLog1"+num2);
        labelPathLog1.setAttribute("class", "label labellogs");
        labelPathLog1.innerHTML = "Member1";
        
        var Logpath1 = doc.createElement("input");
        Logpath1.setAttribute("id", "Logpath1"+num2);
        Logpath1.setAttribute("class", "textoCorto textLogs");
        Logpath1.setAttribute("value", "C:\\BD1\\HD1");
        Logpath1.setAttribute("size", "30");
        Logpath1.setAttribute("type", "text");
        //-- -
        var labelPathLog2 = document.createElement("label");
        labelPathLog2.setAttribute("id", "labelPathLog2"+num2);
        labelPathLog2.setAttribute("class", "label labellogs");
        labelPathLog2.innerHTML = "Member2";
        
        var Logpath2 = doc.createElement("input");        
        Logpath2.setAttribute("id", "Logpath2"+num2);
        Logpath2.setAttribute("class", "textoCorto textLogs");
        Logpath2.setAttribute("value", "C:\\BD1\\HD1");
        Logpath2.setAttribute("size", "30");
        Logpath2.setAttribute("type", "text");
        //----
        var labelPathLog3 = document.createElement("label");
        labelPathLog3.setAttribute("id", "labelPathLog3"+num2);
        labelPathLog3.setAttribute("class", "label labellogs");
        labelPathLog3.innerHTML = "Member3";
        
        var Logpath3 = doc.createElement("input");
        Logpath3.setAttribute("id", "Logpath3"+num2);
        Logpath3.setAttribute("class", "textoCorto textLogs");
        Logpath3.setAttribute("value", "C:\\BD1\\HD1");
        Logpath3.setAttribute("size", "30");
        Logpath3.setAttribute("type", "text");
        
        doc.getElementById("divLogs").appendChild(divLOGS);
        divLOGS.appendChild(labelLOGS);
        divLOGS.appendChild(labelg);
        divLOGS.appendChild(groupLOG);
        divLOGS.appendChild(labelsi);
        divLOGS.appendChild(sizeLOGS);
        ComboBox("comboLogs" + num2, "divLOGS" + num2);
        divLOGS.appendChild(labelPathLog1);
        divLOGS.appendChild(Logpath1);
        divLOGS.appendChild(labelPathLog2);
        divLOGS.appendChild(Logpath2);
        divLOGS.appendChild(labelPathLog3);
        divLOGS.appendChild(Logpath3);
                
        
    } else
    {
         createMsg("Alerta de Logfiles","No se pueden agregar más Logfiles",2);
    }
}
